import xlwings as xw
app = xw.App(visible=False, add_book=False)
workbook = app.books.open('F:\\python\\第4章\\推荐图书.xlsx')
worksheet = workbook.sheets[0]
area = worksheet.range('A2').expand('down')
area.wrap_text = True
workbook.save('F:\\python\\第4章\\推荐图书1.xlsx')
workbook.close()
app.quit()
